<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // 如何修改数组中的元素的值
    let ages = [] // 空数组
    console.log(ages);  
    console.log(ages[0]);  // 得到什么结果？

     
    let names = ['张三', '李四', '王五']
   
    // // 给所有的数组元素后面加个老师  修改
    for (let index = 0; index < names.length; index++) {
      names[index] = names[index] + '老师'
      
    }
    
    console.log(names)


  </script>
</body>

</html>